package helper;

import java.util.List;
import java.util.Set;

import plotter.GraphPlotterInfo;
import processor.RiskFactor;

public class PredictionResult {
	
	//Known risk factors
	private RiskFactor[] riskFactors;
	
	//Lab tests recommendation
	private String[] testsRecommended;
	
	//Lab test results for which patient has not provided any details
	private String[] resultsNotAvailable;
	
	//All other parameters which are possible risks to patient
	private RiskFactor[] otherRiskFactors;	
	
	private GraphPlotterInfo[] graphObjects;

	private String disease;
	
	private double probability = 0;
	
	
	public PredictionResult(String disease){
		this.disease = disease;
	}
	
	public PredictionResult(){
		
	}
	
	public String getDisease() {
		return disease;
	}

	public void setDisease(String disease) {
		this.disease = disease;
	}

	public double getProbability() {
		return probability;
	}

	public void setProbability(double probability) {
		this.probability = probability;
	}

	public RiskFactor[] getRiskFactors() {
		return riskFactors;
	}

	public void setRiskFactors(RiskFactor[] riskFactors) {
		this.riskFactors = riskFactors;
	}
	
	public void setRiskFactors(List<RiskFactor> riskFactors) {
		
		RiskFactor[] arrRiskFactors = new RiskFactor[riskFactors.size()];	
		this.riskFactors = riskFactors.toArray(arrRiskFactors);
	}
	
	public void setOtherRiskFactors(List<RiskFactor> riskFactors) {
		
		RiskFactor[] arrOtherRiskFactors = new RiskFactor[riskFactors.size()];	
		this.otherRiskFactors = riskFactors.toArray(arrOtherRiskFactors);
	}

	public void setTestsRecommended(Set<String> testsRecommended) {
		String[] arrTestRecommended = new String[testsRecommended.size()];
		this.testsRecommended = testsRecommended.toArray(arrTestRecommended);
	}
	
	public void setResultsNotAvailable(Set<String> resultsNotAvailable) {
		String[] arrResultsNotAvailable = new String[resultsNotAvailable.size()];
		this.resultsNotAvailable = resultsNotAvailable.toArray(arrResultsNotAvailable);
	}
	
	
	public GraphPlotterInfo[] getGraphObjects() {
		return graphObjects;
	}

	public void setGraphObjects(List<GraphPlotterInfo> graphObjects) {
		GraphPlotterInfo[] arrGO = new GraphPlotterInfo[graphObjects.size()];
		this.graphObjects = graphObjects.toArray(arrGO);
	}

	
	public String[] getResultsNotAvailable() {
		return resultsNotAvailable;
	}

	public RiskFactor[] getOtherRiskFactors() {
		return otherRiskFactors;
	}

	
	public String[] getTestsRecommended() {
		return testsRecommended;
	}


}
